﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ShoppingApp2.Consts;

namespace ShoppingApp2.Users
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
                return;

            //SetInitialView();
            SetCurrentView(LoginViews.Register);
        }

        /// <summary>
        /// Sets view for user with textboxes to logon
        /// </summary>
        protected void SetInitialView()
        {
            SetCurrentView(LoginViews.LogOn);
        }

        /// <summary>
        /// Sets current view based on enum
        /// </summary>
        /// <param name="view">View based on enum</param>
        protected void SetCurrentView(LoginViews view)
        {
            this.multiViewLogin.ActiveViewIndex = (int)view;
        }

      
    }
}